package com.rhf.ui.gwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerManager;

import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.rhf.ui.gwt.client.menu.Menu;
import com.rhf.ui.gwt.client.top.TopPanel;

/**
 * Point d'entré principal de l'application
 * 
 * @author fsau
 *
 */
public class Main implements EntryPoint {
	
	/*
	 * 
	 */
	interface Binder extends UiBinder<DockLayoutPanel, Main> { 
		
	}
	
	/**
	 * 
	 */
	private static final Binder binder = GWT.create(Binder.class);
	
	@UiField TopPanel topPanel;
	@UiField Menu menu;

	/**
	 * Chargement
	 */
	public void onModuleLoad() {
		
		HandlerManager handlerManager = new HandlerManager(null);
		
		RootPanel.get();
		RootLayoutPanel.get();
		
		// 
		DockLayoutPanel dockLayoutPanel = binder.createAndBindUi(this);
		
		// Get rid of scrollbars, and clear out the window's built-in margin,
	    // because we want to take advantage of the entire client area.
	    Window.enableScrolling(false);
	    Window.setMargin("0px");
	    
	    RootLayoutPanel root = RootLayoutPanel.get();
	    root.add(dockLayoutPanel);

	}

}
